port=8888
base="official-backend"
tag="$base:$(date +%Y%m%d%H%M)"
oldImage="$(docker ps | grep $base | tr -s ' ' | cut -d ' ' -f 1)"
docker build -t $tag -f Dockerfile .
docker stop $oldImage
docker rm -f $oldImage
docker run -d -p $port:8080 -e ENV=prod $tag
docker image prune -a